package com.fusuhai01;

public class Team {
    String number;
    Arm[] arms;

    public Team(String number) {
        arms = new Arm[10];
    }

    public void addsoldier(Arm arm,int i){
        if (i < arms.length) {
            arms[i] = arm;
    }
}

    public void listAllSoldier(){
        String name = "";
        String number = "";
        for (int i = 0;i<arms.length;i++){
            name = arms[i].name;
            number=arms[i].number;
            System.out.println("编号为：" + number + "，姓名为：" + name);
            arms[i].learn();
        }
    }

}
